/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.enforcement.integral.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.enforcement.common.constant.enums.EnforcementModDictEnum;
import com.hopes.bizz.enforcement.common.constant.enums.EnforcementSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 兑换记录
 *
 * @author daijie
 * @date 2023-07-26 11:07:08
 */
@Data
@TableName("risk_integral_exchange")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "兑换记录")
public class RiskIntegralExchangeEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


	/**
	* 标识
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="标识")
    private Long id;

	/**
	* 账户
	*/
    @Schema(description="账户")
    private Long accountId;

	/**
	* 商品
	*/
    @Schema(description="商品")
    private Long goodsId;

	/**
	 * 商品名称
	 */
	@Schema(description="商品名称")
	private String goodsName;

	/**
	* 兑换数量
	*/
    @Schema(description="兑换数量")
    private Integer amount;

	/**
	* 兑换时间
	*/
    @Schema(description="兑换时间")
    private Date exchangeTime;

	/**
	* 商品发放状态
	*/
    @Schema(description="商品发放状态")
    private Integer issueStatus;

	/**
	* 审核状态
	*/
    @Schema(description="审核状态")
    private Integer auditStatus;

	/**
	 * 审核结果
	 */
	@Schema(description="审核结果")
	private Integer auditResult;

	/**
	* 确认状态
	*/
    @Schema(description="确认状态")
    private Integer confirmStatus;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;


	/* 员工 */
	public String getAccountIdStr() {
		return DictResolver.getItemLabelByValue(AdminDictEnum.sys_user, this.getAccountId());
	}

	/**
	 * 积分商品
	 */
	public String getGoodsIdStr() {
		return DictResolver.getItemLabelByValue(EnforcementModDictEnum.risk_integral_goods, this.getGoodsId());
	}

	/**
	 * 发放状态
	 */
	public String getIssueStatusStr() {
		return DictResolver.getItemLabelByValue(EnforcementSysDictEnum.integral_goods_issue_status, this.getIssueStatus());
	}

	/**
	 * 待审核状态
	 */
	public String getAuditStatusStr() {
		return DictResolver.getItemLabelByValue(EnforcementSysDictEnum.integral_goods_audit_status, this.getAuditStatus());
	}

	/**
	 * 已审核结果
	 */
	public String getAuditResultStr() {
		return DictResolver.getItemLabelByValue(EnforcementSysDictEnum.integral_goods_audit_result, this.getAuditResult());
	}

	/**
	 * 确认状态
	 */
	public String getConfirmStatusStr() {
		return DictResolver.getItemLabelByValue(EnforcementSysDictEnum.integral_goods_confirm_status, this.getConfirmStatus());
	}
}
